package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_pms_z_cls database table.
 * 
 */
@Entity
@Table(name="per_pms_z_cls")
@NamedQuery(name="PerPmsZCls.findAll", query="SELECT p FROM PerPmsZCls p")
public class PerPmsZCls implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int clsid;

	private String clsname;

	//bi-directional many-to-one association to PerPmsZTypez
	@ManyToOne
	@JoinColumn(name="TYPEZID")
	private PerPmsZTypez perPmsZTypez;

	//bi-directional many-to-one association to PerPmsZJnxx
	@OneToMany(mappedBy="perPmsZCl")
	private List<PerPmsZJnxx> perPmsZJnxxs;

	//bi-directional many-to-one association to PerPmsZZes
	@OneToMany(mappedBy="perPmsZCl")
	private List<PerPmsZZes> perPmsZZes;

	//bi-directional many-to-one association to PerTngRet
	@OneToMany(mappedBy="perPmsZCl")
	private List<PerTngRet> perTngRets;

	public PerPmsZCls() {
	}

	public int getClsid() {
		return this.clsid;
	}

	public void setClsid(int clsid) {
		this.clsid = clsid;
	}

	public String getClsname() {
		return this.clsname;
	}

	public void setClsname(String clsname) {
		this.clsname = clsname;
	}

	public PerPmsZTypez getPerPmsZTypez() {
		return this.perPmsZTypez;
	}

	public void setPerPmsZTypez(PerPmsZTypez perPmsZTypez) {
		this.perPmsZTypez = perPmsZTypez;
	}

	public List<PerPmsZJnxx> getPerPmsZJnxxs() {
		return this.perPmsZJnxxs;
	}

	public void setPerPmsZJnxxs(List<PerPmsZJnxx> perPmsZJnxxs) {
		this.perPmsZJnxxs = perPmsZJnxxs;
	}

	public PerPmsZJnxx addPerPmsZJnxx(PerPmsZJnxx perPmsZJnxx) {
		getPerPmsZJnxxs().add(perPmsZJnxx);
		perPmsZJnxx.setPerPmsZCl(this);

		return perPmsZJnxx;
	}

	public PerPmsZJnxx removePerPmsZJnxx(PerPmsZJnxx perPmsZJnxx) {
		getPerPmsZJnxxs().remove(perPmsZJnxx);
		perPmsZJnxx.setPerPmsZCl(null);

		return perPmsZJnxx;
	}

	public List<PerPmsZZes> getPerPmsZZes() {
		return this.perPmsZZes;
	}

	public void setPerPmsZZes(List<PerPmsZZes> perPmsZZes) {
		this.perPmsZZes = perPmsZZes;
	}

	public PerPmsZZes addPerPmsZZe(PerPmsZZes perPmsZZe) {
		getPerPmsZZes().add(perPmsZZe);
		perPmsZZe.setPerPmsZCl(this);

		return perPmsZZe;
	}

	public PerPmsZZes removePerPmsZZe(PerPmsZZes perPmsZZe) {
		getPerPmsZZes().remove(perPmsZZe);
		perPmsZZe.setPerPmsZCl(null);

		return perPmsZZe;
	}

	public List<PerTngRet> getPerTngRets() {
		return this.perTngRets;
	}

	public void setPerTngRets(List<PerTngRet> perTngRets) {
		this.perTngRets = perTngRets;
	}

	public PerTngRet addPerTngRet(PerTngRet perTngRet) {
		getPerTngRets().add(perTngRet);
		perTngRet.setPerPmsZCl(this);

		return perTngRet;
	}

	public PerTngRet removePerTngRet(PerTngRet perTngRet) {
		getPerTngRets().remove(perTngRet);
		perTngRet.setPerPmsZCl(null);

		return perTngRet;
	}

}